<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>P165 7.3.3 节点删除</title>
</head>

<body>
    <ul>
        <li>PHP</li>
        <li>JavaScript</li>
        <li class="strong">UI</li>
    </ul>
    <script>
        var child = document.getElementsByTagName('li')[2];
        var attr = child.getAttributeNode('class');
        console.log(child.removeAttributeNode(attr));
        console.log(child.parentNode.removeChild(child));
    </script>
    <a href="../首页/page07.html">
        <h2>返回上一页面</h2>
    </a>
</body>

</html>